import { ElMessage } from 'element-plus';
import useClipboard from 'vue-clipboard3';
const { toClipboard } = useClipboard();
export const handleCopy = async (text: string, desc?: string) => {
    try {
        await toClipboard(text);
        ElMessage.success(desc ? `${desc}复制成功` : `复制成功`)

    } catch (e) {
        ElMessage.error(desc ? `${desc}复制成功` : `复制成功`)
    }
};